<template>
  <div class="">
    <el-form :model="inspectDetail" class="elForm">
      <el-card class="box-card" shadow="never">

        <div slot="header" class="header-card">
          <span class="header-card-title">基础信息</span>
        </div>
        <el-row :gutter="24">
          <el-col :span="8" v-if="isShow">
            <el-form-item label="车架号:" style="width: 100%;">
              <span>{{ inspectDetail.vinNo }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="车牌号:">
              <span>{{ inspectDetail.carNo }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="品牌/车系/车型:">
              <span>
                {{
                  `${inspectDetail.brandName}${inspectDetail.seriesName ? '/' + inspectDetail.seriesName :
                      ''}${inspectDetail.modelName ? '/' + inspectDetail.modelName : ''}`
                }}
              </span>
            </el-form-item>

          </el-col>
        </el-row>

        <el-row :gutter="24">
          <el-col :span="8" v-if="isShow">
            <el-form-item label="合同禀议号:">
              <span>{{ inspectDetail.contractNo }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="采购禀议号:">
              <span>{{ inspectDetail.purchaseNo }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="客户名称:">
              <span>{{ inspectDetail.customerName }}</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="24">
          <el-col :span="8" v-if="isShow">
            <el-form-item label="客户类型:">
              <span>
                 {{ selectDictLabel(dict.type.customer_type, inspectDetail.customerType) }}
              </span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="车辆归属:">
              <span>{{ inspectDetail.ascription }}</span>
            </el-form-item>
          </el-col>
          <el-col :span="8" v-if="isShow">
            <el-form-item label="车辆产权:">
              <span>{{ inspectDetail.propertyRightName }}</span>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="24">
          <el-col :span="8" v-if="isShow">
            <el-form-item label="工单创建时间:">
              <span>{{ inspectDetail.createTime }}</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "basicsInfo",
  dicts:['customer_type'],
  props: {
    value: {
      type: Object,
      default: {},
    },
    isEdit: {
      type: Boolean,
      default: true
    }
  },
  watch: {
    value: {
      handler(newValue, oldVlue) {
        if (newValue) {
          this.inspectDetail = newValue
        }
      }
    },
    immediate: true,
    deep: true,
  },
  data() {
    return {
      inspectDetail: {},
      isShow: true
    };
  },
  created() {
  },
  mounted() {
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
@import "@/styles/cwgd/formScss.scss";
</style>


